home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / comm / net / ACS_Notify.lha / NotifyArexx.amicomsys < prev    next >
Text File  |  1997-12-06  |  4KB  |  122 lines

  1. /*
  2. $VER: Notify User [Arexx script] V0.19ß (6-12-97) © Copex - aWo 
  3.  
  4. Bug Reports ect to -: copex@online.u-net.com
  5. Uppdates/Bugfixes :- http:www.online.u-net.com/updates/
  6. */
  7.  
  8. player = 'C:Play16 <>NIL:'               /* Mod or Sample Player With Path .*/
  9. soundfileC = 'Internet:amicom/NTF.SND'  /* Sound File to Play when user Connects..*/
  10. soundfileD = 'Internet:amicom/NTF.SND' /* Sound File to Play when user Disconnects .*/
  11. PlaySonud = 'Yes'                     /* Play A sample On Maching of a listed uesr */
  12.  
  13. /* Users to notifi when connecting/disconnecting. Add as many users as you
  14.    wish in the format of user.x = 'User Nick/Realname ' (x beinging the next 
  15.    number starting from 0) */
  16.  
  17. user.0 = 'tibb' 
  18. user.1 = 'hparting'
  19. user.2 = 'copex'
  20.  
  21. NumberOfUsers = 3     /* The Nummber of users you have enterd eg. user.0 = 1, user.1 = 2 ect */
  22. CaseSensative = 'no' /* Yes Or No if yes then user.x must be the same as the user your checking for */
  23. ShowReqC = 'yes'    /* Show a requstor of users connecting.. (Yes or No)*/
  24. ShowReqD = 'yes'   /* Show a requstor of users Disconnecting.. (Yes or No)*/
  25. ChkStart = 'no'   /* Yes oR No ---> Read Docs First or leave set to NO */
  26.  
  27. /* Do Not Tuch Any Code Below Here Unless You Know What You Are Doing .... */
  28.  
  29. ADDRESS AMICOMSYS
  30. OPTIONS RESULTS
  31.  
  32. NL = '0a'x
  33.  
  34. IF ~SHOW('LIBRARIES','rexxreqtools.library') THEN
  35. IF ~ADDLIB('rexxreqtools.library',0,-30,0) THEN
  36. EXIT(10)
  37.  
  38. tags='rt_reqpos=reqpos_centerwin' 'rtez_defaultresponse=0'
  39.  
  40. GET stem info. CLIENTLIST;
  41.  
  42. noc = info.numclients - 1
  43.  
  44. uflag = getclip('NoAmicomUsers')
  45.  
  46.  
  47. if uflag = '' | uflag = 0 then do
  48.     call setclip('NoAmicomUsers',noc)
  49.  
  50.     if upper(ChkStart) = 'YES' Then do
  51.     if upper(CaseSensative) = 'NO' then do; do i = 0 to NumberOfUsers - 1; user.i = upper(user.i); end; end
  52.     do ee = 0 to NumberOfUsers - 1
  53.        do e = 0 to noc
  54.         if user.ee = info.usernames.e | user.ee = info.realnames.e then do
  55.                    call setclip(user.ee,'1')
  56.                    SAY user.ee||' is OnLine .... '
  57.         end
  58.         if user.ee = upper(info.usernames.e) | user.ee = upper(info.realnames.e) then do
  59.            call setclip(user.ee,'1')
  60.                    SAY user.ee||'Is OnLine .... '
  61.         end
  62.        end
  63.     end
  64.     end
  65.  
  66.     exit
  67. end
  68.  
  69. if uflag ~= noc then do
  70.  
  71. if upper(CaseSensative) = 'NO' then do; do i = 0 to NumberOfUsers - 1; user.i = upper(user.i); end; end
  72.  
  73.     call setclip('NoAmicomUsers',noc)
  74.  
  75.    if noc > uflag then do
  76.  
  77.         usrN = info.usernames.noc
  78.         usrR = info.realnames.noc
  79.         usrH = info.hostnames.noc
  80.  
  81.         if upper(CaseSensative) = 'NO' then do; usrN = upper(usrN);usrR = upper(usrR); usrH = upper(usrH); end
  82.  
  83.     do x = 0 to NumberOfUsers - 1
  84.  
  85.        if user.x = usrR | user.x = usrN then do 
  86.  
  87.         info = "User Name -: "|| usrN ||NL||"RealName -: "|| usrR ||NL||"Host -: "||usrH
  88.         sound = Player ||" "|| SoundfileC
  89.  
  90.         If upper(PlaySonud) = 'YES' Then address command sound
  91.         If upper(ShowReqC) = 'YES' Then sel=rtezrequest(info,"oK","User Connected",tags)
  92.         call setclip(user.x,'1')
  93.        end
  94.         end
  95.  
  96.    end
  97.  
  98.     if noc < uflag then do
  99.  
  100.     do xx = 0 to NumberOfUsers -1
  101.        seen = getclip(user.xx); fnd = 0
  102.             if seen = 1 then do
  103.  
  104.         do x = 0 to noc
  105.            if user.xx = info.usernames.x | user.xx = info.realnames.x then fnd = 1
  106.            if user.xx = upper(info.usernames.x) | user.xx = upper(info.realnames.x) then fnd = 1
  107.         end 
  108.  
  109.         if fnd = 0 then do 
  110.             call setclip(user.xx,'')
  111.         sound = Player ||" "|| SoundfileD
  112.         If upper(PlaySonud) = "YES" Then address command sound
  113.         If upper(ShowReqD) = 'YES' Then sel=rtezrequest(user.xx||" Has Left Amicomsys ","oK","User Left",tags)
  114.         end
  115.  
  116.          end
  117.         end
  118.     end
  119. end
  120.  
  121. exit
  122.